package com.oracle.service.impl;

import com.oracle.mapper.NewsTypeMapper;
import com.oracle.pojo.NewsType;
import com.oracle.service.NewsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class NewsTypeServiceImpl implements NewsTypeService {
    @Autowired
    private NewsTypeMapper newsTypeMapper;
    @Override
    public List<NewsType> getAllNewsType() {
        return newsTypeMapper.selectAllNewsType();
    }

    @Override
    public boolean addNewsType(NewsType newsType) {
        return newsTypeMapper.insertNewsType(newsType)>0;
    }

    @Override
    public boolean deleteNewsById(Integer id) {
        return newsTypeMapper.deleteNewsTypeById(id)>0;
    }
}
